
import { defineStore } from 'pinia'
import { ref } from 'vue'

// 定义store
// defineStore(仓库的唯一标识,()=>{...})
export const useUserInfoStore =  defineStore('userInfo',()=>{
    // 声明数据 state
    const user = ref({
      phone:'',
      userId:'',
      password:'',
      gender:'',
      head:'',
      name:''
    })

    return {
      user,
    }
  },{
    persist:{
      key:'user',
      paths:['user']
    }
  })